/**   
* @Description: 响应消息体 
*/ 
package org.kskj.ipw.entity;

import java.io.Serializable;

import org.kskj.ipw.constant.ResponseCode;

/** 
* @author sztan 
* @date 2016年8月1日 上午8:57:16 
* @version 1.0 
*/
public class ResponseEntity implements Serializable {

	/** 
	* @Fields serialVersionUID :  序列化版本 
	*/ 
	private static final long serialVersionUID = -3127131655380558520L;

	private ResponseCode code;
	
	private Object data;

	private String msg;
	
	public ResponseEntity() {
		super();
		this.code = ResponseCode.ERROR;
		this.data = null;
		this.msg = "失败";
	}
	
	public ResponseEntity(String message) {
		super();
		this.code = ResponseCode.ERROR;
		this.data = null;
		this.msg = "失败";
	}
	
	public ResponseEntity(Object data) {
		super();
		this.code = ResponseCode.SUCCESS;
		this.data = data;
		this.msg = "message";
	}
	
	public ResponseEntity(Object data, String message) {
		super();
		this.code = ResponseCode.SUCCESS;
		this.data = data;
		this.msg = message;
	}
	
	public ResponseEntity(ResponseCode resultCode, Object data, String message) {
		super();
		this.code = resultCode;
		this.data = data;
		this.msg = message;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public ResponseCode getResultCode() {
		return code;
	}

	public void setResultCode(ResponseCode resultCode) {
		this.code = resultCode;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public String getMessage() {
		return msg;
	}

	public void setMessage(String message) {
		this.msg = message;
	}
}
